package com.jyh.springboot1.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/15 15:34
 */
@RestController
@RequestMapping("/people")
public class PeopleController {
    @Value("${student.name}")
    private String name;
    @RequestMapping("/name")
    public String name(){
        return name;
    }
    @RequestMapping("/hello")
    public Map hello(){
       Map<String, Object> map = new HashMap<>();
       map.put("name","蒋");
       map.put("age",22);
       return map;
    }
}
